@import '../styles/font';
@import '../styles/color';
@import '../styles/corner';
@import '../styles/scrollbar';
@import '../styles/center';
@import '../styles/layouts';
@import '../styles/shadow';

.modal-body {
  display: flex;
  flex-direction: column;
  background-color: $color-white;
  position: fixed;
  overflow: hidden;
  width: 500px;
  height: 570px;
  @include default-font;
  @include align-center;
  @include round-corner;

  .modal-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    font-size: 20px;
    line-height: 1;
    text-align: left;
    padding: 16px 20px 16px 30px;
    margin: 0;
    box-shadow: $shadow-card;
    z-index: 10;
    font-weight: $font-weight-semi-bold;

    .close-button {
      cursor: pointer;
    }
  }

  .changelog {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: $color-modal-background;
    overflow: hidden;

    > ul {
      flex: 1;
      list-style: none;
      display: block;
      padding: 0;
      overflow-y: auto;
      margin: 4px;
      @include scroll-bar;

      > li {
        display: flex;
        flex-direction: column;
        padding: 20px;
        list-style: none;
        text-align: left;
        box-shadow: $shadow-card;
        margin: 10px;
        background: white;
        word-break: break-word;
        border-radius: 4px;

        > .title {
          text-align: center;
          font-weight: $font-weight-semi-bold;
          font-size: 18px;
        }

        > .summary {
          margin-top: 10px;
        }

        > .released-date {
          text-align: right;
          margin-top: 10px;
          color: $color-time;
        }
      }
    }
  }

  .view-all-updates {
    width: 100%;
    height: 70px;
    display: flex;
    box-sizing: border-box;
    padding: 24px;
    align-items: center;
    justify-content: center;
    box-shadow: $shadow-card;

    button {
      background-color: #424242;
      color: white;
      height: 30px;
    }
  }
}

@include respond-to($phone) {
  .modal-body {
    width: 100vw;
    height: 100vh;
  }
}
